Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dd: move dd_out() function up to module level #4428

Merged
merged 2 commits into from
Feb 24, 2023

Conversation

jfinkels
Copy link
Collaborator

Move the dd_out() function out of the impl Output and up to the
module level, renaming it to dd_copy(). This change aligns it with
the pattern set by std::io::copy(), which similarly takes an input
reader and an output writer.

This does not change the behavior of dd, just the code organization
to make it more closely match the idioms in the Rust standard library.

Move the `finalize()` function out of the `impl Output` block and up
to the module level so that it can be accessed by other module-level
functions.
Move the `dd_out()` function out of the `impl Output` and up to the
module level, renaming it to `dd_copy()`. This change aligns it with
the pattern set by `std::io::copy()`, which similarly takes an input
reader and an output writer.

This does not change the behavior of `dd`, just the code organization
to make it more closely match the idioms in the Rust standard library.
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/tail-2/inotify-dir-recreate. tests/tail-2/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?

@sylvestre sylvestre merged commit 999ee8e into uutils:main Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants